<script setup>
import defaultpic from "../assets/avatarDefault.png";
defineProps({
  src: String,
  height: {
    type: Number,
    default: 34,
  },
  width: {
    type: Number,
    default: 34,
  },
});
</script>

<template>
  <img :src="src || defaultpic" class="avatar" />
</template>

<style scoped>
.avatar {
  width: v-bind(width + "px");
  height: v-bind(height + "px");
  border-radius: 50%;
  background: #eee;
  object-fit: cover;
  object-position: top center;
}
</style>
